<template>
  <div class="form-item">
    <el-form-item :label="config.label" :required="config.require">
      <el-slider
        v-model="value"
        :min="config.min"
        :max="config.max"
        :step="config.step"
        :show-stops="config.showStops"
        :show-input="config.showInput"
      >
      </el-slider>
    </el-form-item>
  </div>
</template>
<script>
    import Vue from 'vue';
    import {Slider, FormItem} from 'element-ui';

    Vue.use(Slider);
    Vue.use(FormItem);

    export default {
        name: 'Slider',
        data() {
            return {
                value: 0
            }
        },
        props: {
            config: {
                type: Object,
                default: () => {
                  return {}
                }
            }
        }
    }
</script>
<style lang="less" scoped>
  @import "slider.less";
</style>
